A man was arrested at Rihanna's Southern California home in the Pacific Palisades ... after neighbors saw the guy snooping around the house and apprehended him on the spot ... TMZ has learned.
Law enforcement sources tell us ... the suspect has told police someone emailed him instructions on how to get into the home ... so he rolled over to the property and followed the directions.
We're told the instructions worked ... because the man was able to get inside the home ... where he allegedly snooped around for a while before neighbors noticed something was up.
Our sources tell us ... neighbors went over to the home and confronted the man -- and eventually detained him when they realized he didn't belong there. Police were called to the scene and took the man into custody.
The man is currently being investigated for burglary.