Jelly, 5 bytes
How it works
&‘<ÆP Main link. Argument: x ‘ Yield x+1. & Take the bitwise AND of x and x+1. This yields 0 iff x is a Mersenne number, i.e., iff x+1 is a power of 2. ÆP Yield 1 if x is a prime, 0 if not. < Compare the results to both sides, This yields 1 iff x is both a Mersenne number and a prime.