To sniff out is to discover or detect something, the way a detective might sniff out a criminal's hideout or a four year-old sniffs out the cookies you hid at the back of a cupboard.
To understand the verb sniff out, imagine a police dog literally sniffing for clues. Detectives sniff out criminals and reporters sniff out the details of a story or a scandal, even when they don't actually use their noses. This figurative meaning of smelling to indicate suspicion has been around a long long time and relates to the concept of something rotten smelling bad; just think back to Shakespeare's use of "There's something rotten in the state of Denmark" to indicate Claudius's corruption. The use of the verb sniff to mean "smell" dates from the nineteenth century.