Here a \cutoff gets introduced. It is between 0 and 1. If you choose it closer to 1, more connections get dropped, if you take it closer to 0, less get dropped.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\begin{document}
% really bad practice, sorry
\def\layersep{2cm}
\def\hsep{1cm}
\def\ilsize{8}
\def\hlsize{8}
\def\olsize{8}
\def\rootlrp{6}
\def\neuronsize{4mm}
\tikzset{>=latex}
\begin{figure}
\centering
\begin{tikzpicture}[shorten >=0pt, ->, draw=black!100, node distance=\layersep,
every pin edge/.style={<-,shorten <=1pt},
neuron/.style={circle, draw, fill=black!100, minimum size=\neuronsize,inner sep=0pt},
input neuron/.style={neuron, fill=black!0},
hidden neuron/.style={neuron, fill=black!0},
output neuron/.style={neuron, fill=black!0}]
\pgfmathsetmacro{\iyshift}{0.5*\ilsize-0.5*\hlsize}
\pgfmathsetmacro{\oyshift}{0.5*\olsize-0.5*\hlsize}
%%%%%%%%%%%%
% DRAW NODES
%%%%%%%%%%%%
% Draw the input layer nodes
\foreach \name / \y in {1,...,\ilsize}
\node[input neuron] (In-\name) at (0.0cm+\hsep,-\y cm+\iyshift cm) {};
% Draw the hidden layer nodes
\foreach \name / \y in {1,...,\hlsize}
\node[hidden neuron] (H0-\name) at (1.5cm+\hsep,-\y cm) {};
% Draw the hidden layer nodes
\foreach \name / \y in {1,...,\hlsize}
\node[hidden neuron] (H1-\name) at (3.0cm+\hsep,-\y cm) {};
% Draw the output layer nodes
\foreach \name / \y in {1,...,\olsize}
\node[hidden neuron] (Out-\name) at (4.5cm+\hsep,-\y cm+\oyshift cm) {};
%%%%%%%%%%%%%%%%%%
% DRAW CONNECTIONS
%%%%%%%%%%%%%%%%%%
\pgfmathsetmacro{\cutoff}{0.5}
% Connect every node in the input layer with every node in the hidden layer.
\foreach \source in {1,...,\ilsize}
{\foreach \dest in {1,...,\hlsize}
{\pgfmathparse{int(sign(rnd-\cutoff))}
\ifnum\pgfmathresult=1
\path (In-\source) edge (H0-\dest);
\fi}}
\pgfmathsetmacro{\cutoff}{0.3}
% Connect first with second hidden layer
\foreach \source in {1,...,\hlsize}
{\foreach \dest in {1,...,\hlsize}
{\pgfmathparse{int(sign(rnd-\cutoff))}
\ifnum\pgfmathresult=1
\path (H0-\source) edge (H1-\dest);
\fi}}
\pgfmathsetmacro{\cutoff}{0.7}
% Connect every node from the last hidden layer with the output layer
\foreach \source in {1,...,\hlsize}
{\foreach \dest in {1,...,\olsize}
{\pgfmathparse{int(sign(rnd-\cutoff))}
\ifnum\pgfmathresult=1
\path (H1-\source) edge (Out-\dest);
\fi}}
\end{tikzpicture}
\end{figure}
\end{document}

This is a version that replaces all these \defs by pgf keys. You can use it as
\begin{tikzpicture}[every pin edge/.style={<-,shorten <=1pt}]
\pic{neural network={inputs=7,outputs=6,
cutoff 1=0.5,cutoff 2=1.1,cutoff 3=0.2}};
\end{tikzpicture}
All the keys can be set on the spot, and if you have several of these networks, you things will become much easier. If you set a cutoff to a value larger than 1, all connections will be suppressed, if you set it to 0 or smaller, none of them.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\tikzset{pics/neural network/.style={code={
\tikzset{neural network/.cd,#1}
\def\pv##1{\pgfkeysvalueof{/tikz/neural network/##1}}%
\pgfmathsetmacro{\iyshift}{0.5*\pv{inputs}-0.5*\pv{hidden}}
\pgfmathsetmacro{\oyshift}{0.5*\pv{outputs}-0.5*\pv{hidden}}
%%%%%%%%%%%%
% DRAW NODES
%%%%%%%%%%%%
% Draw the input layer nodes
\foreach \y in {1,...,\pv{inputs}}
\node[/tikz/neural network/input neuron] (In-\y) at (0.0cm,-\y cm+\iyshift cm) {};
% Draw the hidden layer nodes
\foreach \y in {1,...,\pv{hidden}}
\node[/tikz/neural network/hidden neuron] (H0-\y) at (2cm,-\y cm) {};
% Draw the hidden layer nodes
\foreach \y in {1,...,\pv{hidden}}
\node[/tikz/neural network/hidden neuron] (H1-\y) at (4cm,-\y cm) {};
% Draw the output layer nodes
\foreach \name / \y in {1,...,\pv{outputs}}
\node[/tikz/neural network/hidden neuron] (Out-\name) at (6cm,-\y cm+\oyshift cm) {};
%%%%%%%%%%%%%%%%%%
% DRAW CONNECTIONS
%%%%%%%%%%%%%%%%%%
% Connect every node in the input layer with every node in the hidden layer.
\foreach \source in {1,...,\pv{inputs}}
{\foreach \dest in {1,...,\pv{hidden}}
{\pgfmathparse{int(sign(rnd-\pv{cutoff 1}))}
\ifnum\pgfmathresult=1
\path[/tikz/neural network/edge] (In-\source) edge (H0-\dest);
\fi}}
% Connect first with second hidden layer
\foreach \source in {1,...,\pv{hidden}}
{\foreach \dest in {1,...,\pv{hidden}}
{\pgfmathparse{int(sign(rnd-\pv{cutoff 2}))}
\ifnum\pgfmathresult=1
\path[/tikz/neural network/edge] (H0-\source) edge (H1-\dest);
\fi}}
% Connect every node from the last hidden layer with the output layer
\foreach \source in {1,...,\pv{hidden}}
{\foreach \dest in {1,...,\pv{outputs}}
{\pgfmathparse{int(sign(rnd-\pv{cutoff 3}))}
\ifnum\pgfmathresult=1
\path[/tikz/neural network/edge] (H1-\source) edge (Out-\dest);
\fi}}
}},neural network/.cd,inputs/.initial=6,outputs/.initial=6,
hidden/.initial=8,size/.initial=8mm,edge/.style={draw,->},
neuron/.style={circle, draw, fill=black!100,
minimum size=\pgfkeysvalueof{/tikz/neural network/size},inner sep=0pt},
input neuron/.style={/tikz/neural network/neuron, fill=black!0},
hidden neuron/.style={/tikz/neural network/neuron, fill=black!0},
output neuron/.style={/tikz/neural network/neuron, fill=black!0},
cutoff 1/.initial=0,
cutoff 2/.initial=0,
cutoff 3/.initial=0,}
\begin{document}
\tikzset{>=latex}
\begin{figure}
\centering
\begin{tikzpicture}[every pin edge/.style={<-,shorten <=1pt}]
\pic{neural network={inputs=7,outputs=6,
cutoff 1=0.5,cutoff 2=1.1,cutoff 3=0.2}};
\end{tikzpicture}
\end{figure}
\end{document}

In order to make things visually more appealing, you may let the probability depend on the distance between the neurons, and suppress connections to more distant neurons more strongly.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\tikzset{pics/neural network/.style={code={
\tikzset{neural network/.cd,#1}
\def\pv##1{\pgfkeysvalueof{/tikz/neural network/##1}}%
\pgfmathsetmacro{\iyshift}{0.5*\pv{inputs}-0.5*\pv{hidden}}
\pgfmathsetmacro{\oyshift}{0.5*\pv{outputs}-0.5*\pv{hidden}}
%%%%%%%%%%%%
% DRAW NODES
%%%%%%%%%%%%
% Draw the input layer nodes
\foreach \y in {1,...,\pv{inputs}}
\node[/tikz/neural network/input neuron] (In-\y) at (0.0cm,-\y cm+\iyshift cm) {};
% Draw the hidden layer nodes
\foreach \y in {1,...,\pv{hidden}}
\node[/tikz/neural network/hidden neuron] (H0-\y) at (2cm,-\y cm) {};
% Draw the hidden layer nodes
\foreach \y in {1,...,\pv{hidden}}
\node[/tikz/neural network/hidden neuron] (H1-\y) at (4cm,-\y cm) {};
% Draw the output layer nodes
\foreach \name / \y in {1,...,\pv{outputs}}
\node[/tikz/neural network/hidden neuron] (Out-\name) at (6cm,-\y cm+\oyshift cm) {};
%%%%%%%%%%%%%%%%%%
% DRAW CONNECTIONS
%%%%%%%%%%%%%%%%%%
% Connect every node in the input layer with every node in the hidden layer.
\foreach \source in {1,...,\pv{inputs}}
{\foreach \dest in {1,...,\pv{hidden}}
{\pgfmathparse{int(sign(rnd-abs(\source-\pv{inputs}/2-\dest+\pv{hidden}/2)*\pv{cutoff 1}))}
\ifnum\pgfmathresult=1
\path[/tikz/neural network/edge] (In-\source) edge (H0-\dest);
\fi}}
% Connect first with second hidden layer
\foreach \source in {1,...,\pv{hidden}}
{\foreach \dest in {1,...,\pv{hidden}}
{\pgfmathparse{int(sign(rnd-abs(\source-\pv{hidden}/2-\dest+\pv{hidden}/2)*\pv{cutoff 2}))}
\ifnum\pgfmathresult=1
\path[/tikz/neural network/edge] (H0-\source) edge (H1-\dest);
\fi}}
% Connect every node from the last hidden layer with the output layer
\foreach \source in {1,...,\pv{hidden}}
{\foreach \dest in {1,...,\pv{outputs}}
{\pgfmathparse{int(sign(rnd-abs(\source-\pv{hidden}/2-\dest+\pv{outputs}/2)*\pv{cutoff 3}))}
\ifnum\pgfmathresult=1
\path[/tikz/neural network/edge] (H1-\source) edge (Out-\dest);
\fi}}
}},neural network/.cd,inputs/.initial=6,outputs/.initial=6,
hidden/.initial=8,size/.initial=8mm,edge/.style={draw,->},
neuron/.style={circle, draw, fill=black!100,
minimum size=\pgfkeysvalueof{/tikz/neural network/size},inner sep=0pt},
input neuron/.style={/tikz/neural network/neuron, fill=black!0},
hidden neuron/.style={/tikz/neural network/neuron, fill=black!0},
output neuron/.style={/tikz/neural network/neuron, fill=black!0},
cutoff 1/.initial=0,
cutoff 2/.initial=0,
cutoff 3/.initial=0,}
\begin{document}
\tikzset{>=latex}
\begin{figure}
\centering
\begin{tikzpicture}[every pin edge/.style={<-,shorten <=1pt}]
\pic{neural network={inputs=7,outputs=6,
cutoff 1=0.2,cutoff 2=0.25,cutoff 3=0.3}};
\end{tikzpicture}
\end{figure}
\end{document}
