This is a well-known (better said: well-discussed) question in the internet. When you look for answers for popular questions, you usually see them with a variable degree of reliability and complexity. Unfortunately, for this one, I only observed very very crude and general rules of thumb. So let's get a real answer:
A network solid or covalent network solid is a chemical compound (or element) in which the atoms are bonded by covalent bonds in a continuous network extending throughout the material. In a network solid there are no individual molecules, and the entire crystal may be considered a macromolecule. Formulas for network solids, like those for ionic compounds, are simple ratios of the component atoms represented by a formula unit. Covalent network, wikipedia
Diamond and SiO$_2$ are really great examples of covalent networks-lattices. So enough with stories:
If you face a new chemical formula, how would you assume it's a covalent network? (In case it is) Is it somehow done by drawing the Lewis structure? Is there a rule for this? Or is it only possible to know such thing with experimental data?
Fun fact: I'm preparing for an internal chemistry olympiad. The examiners usually take all the exceptions into account. So general rules such as "if it contains Si, it's a covalent network" aren't really reliable for me. Better phrased, I'm looking for a rule with the least exceptions.