using EntityFieldQuery with flagging condition
Don't need to use EntityFieldQuery or views to perform this flag module has already give function to get is_flagged(). All you need to call functions like.

$flag = flag_get_flag('myflag');
$flag-&gt;is_flagged($node-&gt;nid);
if($flag &amp;&amp; $flag-&gt;is_flagged($node-&gt;nid)) {
  print "This node is myflag!";
}