I second Richard's explanation, but would add that this phrase is often used tongue-in-cheek. You use it in order to show a bit of modesty, but at the same time, you are acknowledging your right to brag. It's an extremely idiomatic expression, so tone is very important here!
For example, "This pie I made turned out quite well, if I do/dare say so myself" or "If I do/dare say so myself, I played a pretty good game of squash today."
Note that in both cases, the "brag" (where you're praising yourself) includes a sliver of understatement: "quite well," "pretty good." This isn't a requirement at all, but this is how I would use it. You could also say "That was a damn fine serve (in tennis), if I do/dare say so myself." It seems I'm thinking of many sports-related examples because people are very likely to "humble brag" (pretending to be humble while actually bragging) when playing sports with their friends.