Is there any evolutionary link between the host controlled restriction modification in bacteria (caused by methylation of bacterial sequences to protect viral entry) and methylation of nucleic acid sequences in humans to control transcription?
I would say yes. Functionally, both systems have developed DNA modification mechanisms to discriminate self and alien DNA sequences. In bacteria, self genome is protected by modification while alien sequences are digested. In human, alien virus sequences and mobile elements are preferentially methylated and inactivated, such as Line-1, Alu and many retrovirus sequences. Structurally, DNA methyltransferases in humans have domains that are very conserved between bacterial and humans. The discovery of DNMT3a and DNMT3b started with a tblastn search of human cDNA library with bacterial type II cytosine-5 methyltransferase sequences as queries. Since bacteria does not have histones (although some bacteria histone-like proteins may exist), histone modifications in humans offers much more complexity of epigenetic regulations.