Most English speakers do not pay attention to the the subtleties between these words and treat them like synonyms. In this context, I believe it is more appropriate than some others, since they can both just mean possibly in their own ways. Can is a little more indirect in that meaning, whereas may is more direct but imprecise because it can also note permission. However if you want to read deeply enough into it there might be some arcane distinction.
Probable understanding: It is able to be dangerous. This ability does not have to be exercised, indicating it might not be dangerous but it is nevertheless possible.
Unlikely implication: It might optionally imply the night is known to haves the means establish to be dangerous, such as its own darkness, which makes it hard to operate your bicycle safely.
Probable understanding: It might be dangerous in the sense of there is a chance it is, rather than strength. It is possible but not ascertained.
Unlikely implication: Using this instead of can might indicates you do not know if there are circumstances which could make it dangerous, like thugs or nocturnal monsters taking cover under darkness are actually there. It might be dangerous, if circumstances permit it to be.
Sometimes we might use what is considered the past tense of can, could, when discussing hypothetical ability similar to how we might use would as a hypothetical will. In this case, it seems as if either is appropriate. "I would go, if I could." demonstrates future tense use of both words.
If the author wanted to signify that riding the bicycle at night is certainly dangerous, what probably should have have been written is "It is very dangerous to cycle in the night". There would be no need to modify the substantive verb, noting the existence of danger, with an auxiliary verb and doing so may actually be detrimental to comprehensibility
Definitions of can, may, could, would, is, substantive and auxiliary which are used as external reference material are all found in the Hallen, Cynthia, ed. Renovated Online Edition of Noah Webster’s 1844 American Dictionary of the English Language, http://edl.byu.edu/index.php .