Assuming that the images are in fact released by the copyright holder under the CC_BY 2.0 license, and not under the CC_BY_NC or CC_BY_SA license, you are free to use the image on a book cover. That the book is erotic makes no difference.
You must attribute the cover image to the original creator, as specified in the license, unless the creator has indicated that no attribution should be provided.
You must not state or imply that the original creator has in any way endorsed your book or you.
Be careful to check that the person releasing the image is in fact the copyright holder. It is not unknown for someone to upload someone else's image and claim to release it under a CC license. Obviously a "license" from someone who had no rights does not give you or anyone any rights. Just as buying stolen goods from a thief does not give you title to them.
It is your responsibility to confirm that the person who released the image had the right to do so.