As in, is the information gleaned from erotic literature and pornography (like the dress of the time, for cases of pornographic images, and sundry information that can be gleaned about people's thoughts or daily activities, from erotic literature) used when writing about history, or is it largely disregarded because, as today, a lot of erotic literature and pornography can be wildly unrepresentative of the norms of the day.
[ Please be aware that a lot of these links are NSFW]
The answer to this is yes, of course! Pornographic literature can be used as a historiographical mine to most obviously determine sexual practices, such as when the first dildo was referenced, how men felt about dildoes, how sexuality was constructed, how early privacy and proper manners were established. It is also invaluable to historians of sexuality in discussing where and ideas of heterosexuality and homosexuality originated from and how they spread, or where fears about masturbation came from. Pornography has also been incredibly useful for historians of the body in documenting how people talked about the body, how they constructed it to each other and themselves. There is a great deal of interest to feminist historians as well as historians that focus on early medicine and understandings of the body.
However, as with all sources, we have to be aware that there are strengths and weaknesses to these types of resources. The most obvious one is that they are indeed (often) fantasy, and they have to be treated that way. For example, one of the most famous books about Victorian pornography is The Other Victorians, which was written while he was working with absolutely unexamined material that the Kinsey Institute has just begun cataloging. Rather than treating this as something to be cautious about, Marcus used Freudian psychology to assert that the most famous sexual 'autobiography' My Secret Life was in fact a real autobiography that demonstrated a lot of perverse sexual attitudes and therefore revealed certain things about the author and thereby the whole Victorian generation.
This is...demonstrably untrue. That of course didn't stop the book from becoming insanely popular and reprinted until today, possibly because it just reconfirms a lot of the biases people already had about the Victorians. A much more sensible and reasonable look at My Secret Life comes from Ian Gibson's treatment in The Erotomaniac: The Secret Life of Henry Spencer Ashbee, where he argues (and I and several others happen to agree) that Henry Spencer Ashbee was in fact the author of My Secret Life and that we should look at it as a work that is a mix of fact and fiction, where there might be some "really" real experiences documented, but also treats with a great deal of fantasy and fantasizing. This would be the much more rational and reasonable way of treating these types of material.
Nonetheless, pornography and obscene materials offers us a really significant look into the past, into the type of thing that is all too often censored and destroyed, and helps us understand better.